import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Continents are immutable.
 * 
 * @author joncaddey
 * @version 1.1
 */
public class Continent {
	
	private final String my_name;
	private final List<Territory> my_territories;
	private final int my_value;

	public Continent(final String the_name, final int the_value, final List<Territory> the_territories) {
		my_name = the_name;
		my_value = the_value;
		my_territories = new ArrayList<Territory>(the_territories);
	}

	/**
	 * @return a List of Territories this is composed of.
	 */
	public List<Territory> getTerritories() {
		return Collections.unmodifiableList(my_territories);

	}
	
	public String getName() {
		return my_name;
	}
	
	public int getValue() {
		return my_value;
	}

	
	public String toString() {
		return my_name + ", " + my_value + ":" + my_territories;
	}
}
